<?php

namespace app\http\controller;

use tmcore\base\BaseController;
use tmcore\utils\Helper;

class HttpController extends BaseController
{
    /**
     * 初始化
     * @return mixed|void
     */
    public function initialize()
    {

    }

    /**
     * 异步打印日志
     * @param string $path 相对路径 ./runtime/pay/logs.txt
     * @param array $data 打印数据
     * @return false|int 失败：false,成功：字节数
     */
    public function printLog(string $path, array $data)
    {
        return Helper::printTextLog($path, $data);
    }
}